package presencial2014;
import java.util.Scanner;

public class G {

	@SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String num = in.next();
		while (!num.equals("0")) {
			if (reversible(num)) {
				System.out.println("SI");
			} else {
				System.out.println("NO");
			}
			num = in.next();
		}
	}

	private static boolean reversible(String num) {
		boolean sol = false;
		if (num.charAt(num.length() - 1) != '0') {
			long suma = Long.parseLong(num) + Long.parseLong(reves(num));
			if (todosImpares(suma)) {
				sol = true;
			}
		}
		return sol;
	}

	private static boolean todosImpares(long n) {
		boolean sol = true;
		while (sol && n != 0) {
			sol = (n % 2 != 0);
			n = n / 10;
		}
		return sol;
	}

	private static String reves(String num) {
		String sol = "";
		for (int i = num.length() - 1; i >= 0; i--) {
			sol += num.charAt(i);
		}
		// System.out.println("DEBUG:"+sol);
		return sol;
	}

}
